package com.task.controller;


import com.task.service.ITeaAssStuService;
import com.task.vo.ResultVo;
import com.task.vo.TeaStuVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liuzhe
 * @since 2021-04-10
 */
@RestController
@RequestMapping("/tea-ass-stu")
public class TeaAssStuController {

    @Autowired
    private ITeaAssStuService teaAssStuService;

    @PostMapping("/add")
    public ResultVo add(@RequestBody TeaStuVo teaStuVo) {
        if (teaAssStuService.addStusToTea(teaStuVo)) {
            return ResultVo.success("添加成功");
        }
        return ResultVo.failed("添加失败");
    }
}

